<?php
    function do_html_header($title) {
        //print a html header
?>
<html>
<head>
    <title><?php echo $title; ?></title>
    <style>
    body{font-family:Arial,Helvetica,sans-serif;font-size:12px}
    li,td{font-family:Arial,Helvetica,sans-serif;font-size:12px}
    hr{color:$3333cc;width:300px;text-align:left}
    a{color:#000000}
    </style>
</head>
<body>
<img src="bookmark.jpeg" border="0" align="left" valign="bottom"
height="55" width="57" />
<h1>PHPbookmark</h1>
<hr />
<?php
    if($title) {
    do_html_heading($title);
    }
}

    function display_site_info() {
        echo "*  确保您的密码不含任何字典中包含的单词（正序单词或倒序单词）。"."<br />".
              "* 使用字母、数字和符号的组合。仅在密码后添加一串数字可能无法确保密码安全。"."<br />".
              "* 请勿使用连续的键盘字母（例如qwerty）。"."<br />".
              "* 请勿使用真实姓名、账号名、人物名及其变体。"."<br />".
              "* 请勿使用重复而连续的字符（例如abcabc）。 "."<br />";

        echo "<a href=\"register_form.php\">"."Not a member?"."</a>";
    }

    function display_login_form() {
?>
    
    <form method="post" action="">
       Members log in here
       <input type="hidden" name="pid" value="<?php echo $_GET['id']?>">
       <br />Username:<input type="text" name="username" size="30"><br />
       <br />Password:<input type="password" name="passwd" size="30"><br />
       <span class="submit">
            <input type="submit" value="login"/>
       </span>
       <p><a href="forgot_passwd.php">Forgot your password?</a></p>
<?php
    }

    function do_html_footer() {
?>
<table width="100%" bgcolor="lightblue" cellpadding="12" border="0">
    <tr>
        <td>
        <p class="foot">Copyright &copy; 2009-2010 yotomi. All rights reserved</p>
        <p class="foot">Here is  another <a href="http://yotomi.cn/blog">blog</a></p>
        </td>
    </tr>
</table>
<?php
    }

    function display_registration_form() {
?>
    <form method="post" action="register_new.php">
       <input type="hidden" name="pid" value="<?php echo $_GET['id']?>">
       <br />Email adderss:<input type="text" name="email" size="30"><br />
       <br />Username(max 16 chars):<input type="text" name="username" size="30"><br />
       <br />Password(between 6 and 16 chars):<input type="password" name="passwd" size="30"><br />
       <br />Confirm password:<input type="password" name="passwd" size="30"><br />
       <span class="submit">
            <input type="submit" value="Register"/>
       </span>
<?php
    }
?>



